public class HopNumber {

  public int numHops (int n) {
    if( n < 0 ) return 0;
    if( n == 0 ) return 1;
    
    return numHops(n-1)+numHops(n-2)+numHops(n-3);
  }

}